/*
 * =====================================================================================
 *
 *       Filename:  test.c
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  12/20/2010 10:34:26 AM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  YOUR NAME (), 
 *        Company:  
 *
 * =====================================================================================
 */
#include <stdio.h>
#include "wav.h"
typedef     union{
    int v;
    char c[4];
}uint4;

int testEnum()
{
    uint4 a;
    a.c[0]='R'; a.c[1]='I'; a.c[2]='F'; a.c[3]='F';
    printf("RIFF:%0x\n", a.v);
    a.c[0]='W'; a.c[1]='A'; a.c[2]='V'; a.c[3]='E';
    printf("WAVE:%0x\n", a.v);
    a.c[0]='f'; a.c[1]='a'; a.c[2]='c'; a.c[3]='t';
    printf("fact:%0x\n", a.v);
    a.c[0]='d'; a.c[1]='a'; a.c[2]='t'; a.c[3]='a';
    printf("data:%0x\n", a.v);
    a.c[0]='f'; a.c[1]='m'; a.c[2]='t'; a.c[3]=' ';
    printf("fmt :%0x\n", a.v);
}

int main(int argc, char** argv)
{
    char *fn = argv[1];
    WAV_HEADER* wavHeader = readWaveFile(fn);
    printWavHeader(wavHeader);  
    writeWaveFile("tmp.wav", wavHeader);
}
